<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="dashboard/header :: header"></head>
<body>

<!--
@desc  更新
@author LuoAnDong
@since 2019-09-22 05:22:27
-->
	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<!-- /.col-->
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">

								<form class="form-horizontal" id="addForm" style="float:left;width:100%">
								
									<input type="hidden" name="formToken" th:value="${session.formToken}" />
									<input type="hidden" name="id" th:value="${bean.id}" />

<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">api链接</label>
	<div class="col-md-9">
		<input class="form-control" id="url" type="text" name="url" th:value="${ bean.url}" placeholder="api链接">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input"> 请求方式</label>
	<div class="col-md-9">
		<input class="form-control" id="method" type="text" name="method" th:value="${ bean.method}" placeholder=" 请求方式">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">参数列表</label>
	<div class="col-md-9">
		<input class="form-control" id="param" type="text" name="param" th:value="${ bean.param}" placeholder="参数列表">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">请求参数备注</label>
	<div class="col-md-9">
		<input class="form-control" id="paramRemark" type="text" name="paramRemark" th:value="${ bean.paramRemark}" placeholder="请求参数备注">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">请求示例</label>
	<div class="col-md-9">
		<input class="form-control" id="requestExam" type="text" name="requestExam" th:value="${ bean.requestExam}" placeholder="请求示例">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">返回参数说明</label>
	<div class="col-md-9">
		<input class="form-control" id="responseParam" type="text" name="responseParam" th:value="${ bean.responseParam}" placeholder="返回参数说明">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">接口错误码列表</label>
	<div class="col-md-9">
		<input class="form-control" id="errorList" type="text" name="errorList" th:value="${ bean.errorList}" placeholder="接口错误码列表">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">正确返回示例</label>
	<div class="col-md-9">
		<input class="form-control" id="trueExam" type="text" name="trueExam" th:value="${ bean.trueExam}" placeholder="正确返回示例">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">错误返回示例</label>
	<div class="col-md-9">
		<input class="form-control" id="falseExam" type="text" name="falseExam" th:value="${ bean.falseExam}" placeholder="错误返回示例">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">是否可用;0不可用；1可用;-1 删除</label>
	<div class="col-md-9">
		<input class="form-control" id="status" type="text" name="status" th:value="${ bean.status}" placeholder="是否可用;0不可用；1可用;-1 删除">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">所属模块ID</label>
	<div class="col-md-9">
		<input class="form-control" id="moduleId" type="text" name="moduleId" th:value="${ bean.moduleId}" placeholder="所属模块ID">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">接口名</label>
	<div class="col-md-9">
		<input class="form-control" id="interfaceName" type="text" name="interfaceName" th:value="${ bean.interfaceName}" placeholder="接口名">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">remark</label>
	<div class="col-md-9">
		<input class="form-control" id="remark" type="text" name="remark" th:value="${ bean.remark}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">错误码、错误码信息</label>
	<div class="col-md-9">
		<input class="form-control" id="errors" type="text" name="errors" th:value="${ bean.errors}" placeholder="错误码、错误码信息">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">updateBy</label>
	<div class="col-md-9">
		<input class="form-control" id="updateBy" type="text" name="updateBy" th:value="${ bean.updateBy}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">createTime</label>
	<div class="col-md-9">
		<input class="form-control" id="createTime" type="text" name="createTime" th:value="${ bean.createTime}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">版本号</label>
	<div class="col-md-9">
		<input class="form-control" id="version" type="text" name="version" th:value="${ bean.version}" placeholder="版本号">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">排序，越大越靠前</label>
	<div class="col-md-9">
		<input class="form-control" id="sequence" type="text" name="sequence" th:value="${ bean.sequence}" placeholder="排序，越大越靠前">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">header</label>
	<div class="col-md-9">
		<input class="form-control" id="header" type="text" name="header" th:value="${ bean.header}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">fullUrl</label>
	<div class="col-md-9">
		<input class="form-control" id="fullUrl" type="text" name="fullUrl" th:value="${ bean.fullUrl}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">监控类型，多选：
Network("网络异常",1),Include("包含指定字符串",2),NotInclude("不包含指定字符串",3),NotEqual("不等于指定字符串",4);	
</label>
	<div class="col-md-9">
		<input class="form-control" id="monitorType" type="text" name="monitorType" th:value="${ bean.monitorType}" placeholder="监控类型，多选：
Network("网络异常",1),Include("包含指定字符串",2),NotInclude("不包含指定字符串",3),NotEqual("不等于指定字符串",4);	
">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">监控比较内容</label>
	<div class="col-md-9">
		<input class="form-control" id="monitorText" type="text" name="monitorText" th:value="${ bean.monitorText}" placeholder="监控比较内容">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">monitorEmails</label>
	<div class="col-md-9">
		<input class="form-control" id="monitorEmails" type="text" name="monitorEmails" th:value="${ bean.monitorEmails}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">是否是模板</label>
	<div class="col-md-9">
		<input class="form-control" id="isTemplate" type="text" name="isTemplate" th:value="${ bean.isTemplate}" placeholder="是否是模板">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">projectId</label>
	<div class="col-md-9">
		<input class="form-control" id="projectId" type="text" name="projectId" th:value="${ bean.projectId}" placeholder="">
	</div>
</div>
<div class="form-group row margin-right-0">
	<label class="col-md-3 col-form-label" for="text-input">接口返回contentType</label>
	<div class="col-md-9">
		<input class="form-control" id="contentType" type="text" name="contentType" th:value="${ bean.contentType}" placeholder="接口返回contentType">
	</div>
</div>
							
								</form>
							</div>

							<div class="card-footer">
								<button class="btn btn-primary" style="float:right" onclick="update()" type="button">更新</button>
							</div>

						</div>
					</div>
					<!-- /.col-->
				</div>
			</div>
		</div>

	</div>

	<script th:src="@{/asserts/vendors/jquery/js/jquery.min.js}"></script>
	<script th:src="@{/asserts/vendors/jquery.form/jquery.form.min.js}"></script>

	<script th:src="@{/asserts/vendors/layer/layer.js}"></script>
	<script th:src="@{/asserts/js/global.js}"></script>

	<script type="text/javascript">
		// 保存操作
		function update() {
			console.log('update');
			$("#addForm").ajaxSubmit({
				url : ctx+"gateway/dashboard/admin/gateLogger/update",
				type : "POST",
				headers : {
					'Content-Type' : 'application/x-www-form-urlencoded'
				},
				success : function(data) {
					if (data.code == 200) {
						layer.msg("操作成功!");
					} else {
						layer.alert(data.message);
					}
				}
			});
		}
	</script>

</body>
</html>

